home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-2.iso / Files II / Multimedia / A-P / Net Game.sit / Net Game folder / Net Game / printing the script... / 00004_parse script.ls < prev    next >
Encoding:
Text File  |  1994-10-24  |  1.4 KB  |  41 lines

  1. on exitFrame
  2.   global iscript, total_pages
  3.   cursor(4)
  4.   set first_text_cast to the number of cast "i1"
  5.   set last_text_cast to 8
  6.   set text_cast to 0
  7.   set read_line to 1
  8.   set read_text to EMPTY
  9.   set write_page to 1
  10.   set iscript to []
  11.   set lines_per_page to 55
  12.   set spaces to "               "
  13.   repeat while text_cast < last_text_cast
  14.     set read_text to the text of cast (first_text_cast + text_cast)
  15.     set last_read_line to the number of lines in read_text
  16.     set read_line to 1
  17.     repeat while read_line < last_read_line
  18.       if line read_line of read_text = EMPTY then
  19.         set read_line to read_line + 1
  20.         if line read_line of read_text = EMPTY then
  21.           set read_line to read_line + 1
  22.         end if
  23.       end if
  24.       set end_line to read_line + lines_per_page - 1
  25.       set test_line to line end_line of read_text
  26.       if (test_line starts spaces) or (test_line starts "INT.") or (test_line starts "EXT.") then
  27.         set end_line to end_line - 1
  28.         set test_line to line end_line of read_text
  29.         if test_line starts spaces then
  30.           set end_line to end_line - 1
  31.         end if
  32.       end if
  33.       append(iscript, line read_line to end_line of read_text)
  34.       set read_line to end_line + 1
  35.     end repeat
  36.     set text_cast to text_cast + 1
  37.   end repeat
  38.   put "Done parsing iscript text."
  39.   set total_pages to count(iscript) - 1
  40. end
  41.